package com.smartEdu.module.thrift.common;

import com.smartEdu.exception.SystemInitException;

@ThriftServerIface
public abstract class BaseTServer {
	protected String thriftProjectName;
	static final String packPath = "com.smartEdu.module.thrift.server.";
	
	public BaseTServer(String name) {
		thriftProjectName = name;
	}
	
	protected void initProcessor(ThriftServer server) throws Exception {
		server.initProcessor(packPath + thriftProjectName);
	}
	
	protected void stop(ThriftServer server) {
		server.stop();
	}
	
	public abstract void init() throws SystemInitException;
	
	public abstract void stop();
}
